/*******************************************************************************
 * Copyright (c) 2014 Francesco Gabbrielli
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *     Francesco Gabbrielli - initial API and implementation
 ******************************************************************************/
package it.francescogabbrielli.android.solidalapp;

import java.io.Serializable;

/**
 * Chat message with payload: text, type and GCM id
 */
public class ChatMessage implements Serializable {
	
	private static final long serialVersionUID = -1503150302241038340L;
	
	public enum Type {INCOMING, SENDING, SENT, ERROR};
	
	public long id;
	public String text;
	public Type type;
	
	public ChatMessage(long id, String text, Type type) {
		this.id = id;
		this.text = text;
		this.type = type;
	}
	
	@Override
	public String toString() {
		return text;
	}
	
}

